#include "Lock.hh"
#include "Mutex.hh"

Lock* Lock::generate(LockType Type)
{
	Lock* Return;
	switch (Type)
	{
		case MutexType:
			Return = new Mutex;
			checkNullWOR(Return, "Return is NULL.");
			break;
		
		default:
			notifyError(Type, "Unknow type.");
			Return = NULL;
	}
	
	return Return;
}
